package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the pur_inquiry database table.
 * 
 */
@Entity
@Table(name="pur_inquiry")
@NamedQuery(name="PurInquiry.findAll", query="SELECT p FROM PurInquiry p")
public class PurInquiry implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="inquiry_id")
	private String inquiryId;

	private String inquirer;

	@Temporal(TemporalType.DATE)
	private Date inquirydate;

	private String istax;

	@Temporal(TemporalType.DATE)
	private Date makingdate;

	private String makingner;

	private String remarks;

	private String sourceid;

	private String sourcetype;

	private int state;

	private String supplier;

	private String theme;

	//bi-directional many-to-one association to PurInquiryDetail
	@OneToMany(mappedBy="purInquiry")
	private List<PurInquiryDetail> purInquiryDetails;

	public PurInquiry() {
	}

	public String getInquiryId() {
		return this.inquiryId;
	}

	public void setInquiryId(String inquiryId) {
		this.inquiryId = inquiryId;
	}

	public String getInquirer() {
		return this.inquirer;
	}

	public void setInquirer(String inquirer) {
		this.inquirer = inquirer;
	}

	public Date getInquirydate() {
		return this.inquirydate;
	}

	public void setInquirydate(Date inquirydate) {
		this.inquirydate = inquirydate;
	}

	public String getIstax() {
		return this.istax;
	}

	public void setIstax(String istax) {
		this.istax = istax;
	}

	public Date getMakingdate() {
		return this.makingdate;
	}

	public void setMakingdate(Date makingdate) {
		this.makingdate = makingdate;
	}

	public String getMakingner() {
		return this.makingner;
	}

	public void setMakingner(String makingner) {
		this.makingner = makingner;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getSourceid() {
		return this.sourceid;
	}

	public void setSourceid(String sourceid) {
		this.sourceid = sourceid;
	}

	public String getSourcetype() {
		return this.sourcetype;
	}

	public void setSourcetype(String sourcetype) {
		this.sourcetype = sourcetype;
	}

	public int getState() {
		return this.state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getSupplier() {
		return this.supplier;
	}

	public void setSupplier(String supplier) {
		this.supplier = supplier;
	}

	public String getTheme() {
		return this.theme;
	}

	public void setTheme(String theme) {
		this.theme = theme;
	}

	public List<PurInquiryDetail> getPurInquiryDetails() {
		return this.purInquiryDetails;
	}

	public void setPurInquiryDetails(List<PurInquiryDetail> purInquiryDetails) {
		this.purInquiryDetails = purInquiryDetails;
	}

	public PurInquiryDetail addPurInquiryDetail(PurInquiryDetail purInquiryDetail) {
		getPurInquiryDetails().add(purInquiryDetail);
		purInquiryDetail.setPurInquiry(this);

		return purInquiryDetail;
	}

	public PurInquiryDetail removePurInquiryDetail(PurInquiryDetail purInquiryDetail) {
		getPurInquiryDetails().remove(purInquiryDetail);
		purInquiryDetail.setPurInquiry(null);

		return purInquiryDetail;
	}

}